const db = require('../config/db');
class detail {
    detail (id){

        return new Promise(function(resolve) {
            try {
                db.novel_detail.find({
                    where:{
                        status:1,
                        id:id
                    }

                }).then(ret=>{
                    console.log('detail',ret)
                    resolve(ret);
                })
            }catch (e) {
                console.log(e);
                reject({ret_code: 2, ret_msg: '获取数据失败'});
            }




        });



    }


}

module.exports = detail;
